
#include "apt32f102_ifc.h"
#include "../LCD/UI.h"
#include "Flash_WR.h"


void Flash_Write(void)
{
    EnIFCClk;
    Page_ProgramData3(0x0000fe00,16,UI_System.Grill_Unit);
    SYSCON_IWDCNT_Reload();
}

void Flash_Read(void)
{
	static uint32_t temp = 0;
	
	EnIFCClk;
	ReadDataArry2(0x0000fe00,16,&(temp));
	SYSCON_IWDCNT_Reload();
	UI_System.Grill_Unit = temp;
	if((UI_System.Grill_Unit != Unit_F) && (UI_System.Grill_Unit != Unit_C)) UI_System.Grill_Unit = Unit_F;
}
